import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [{
        path: "/",
        name: "Home",
        component: Home,
    },
    {
        path: "/DoubleCakes", // 双饼图
        name: "Pie",
        // route level code-splitting
        // this generates a separate chunk (pie.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "pie" */ "../views/Pie/Pie.vue"),
    },
    {
        path: "/DynamicBarChart", // 动态柱形图 dataZoomBar
        name: "DynamicBarChart",
        component: () =>
            import ("../views/Bar/DynamicBarChart.vue"),
    },
    {
        path: "/dataZoomBar", // 动态柱形图 dataZoomBar
        name: "dataZoomBar",
        component: () =>
            import ("../views/Bar/dataZoomBar.vue"),
    },
    {
        path: "/DoubleDogleg", // 双柱图
        name: "DoubleDogleg",
        component: () =>
            import ("../views/Line/DoubleDogleg.vue"),
    },
    {
        path: "/SingleLine", // 单柱图
        name: "SingleLine",
        component: () =>
            import ("../views/Line/SingleLine.vue"),
    },
    {
        path: "/FixedBubble", // 固定气泡图
        name: "FixedBubble",
        component: () =>
            import ("../views/Caps/FixedBubble.vue"),
    },
    {
        path: "/FloatingBubbles", // 浮动气泡图 SinglePie
        name: "FloatingBubbles",
        component: () =>
            import ("../views/Caps/FloatingBubbles.vue"),
    },
    {
        path: "/SinglePie", // 单个饼图
        name: "SinglePie",
        component: () =>
            import ("../views/Pie/SinglePie.vue"),
    },
    {
        path: "/Pictogram", // 象形图
        name: "Pictogram",
        component: () =>
            import ("../views/Pictogram/Pictogram.vue"),
    },
    {
        path: "/Guage", // 仪表盘图形
        name: "Guage",
        component: () =>
            import ("../views/Guage/guage.vue"),
    },
    {
        path: "/Custom", //甘特图
        name: "Custom",
        component: () =>
            import ("../views/Custom/index.vue"),
    },
];

const router = new VueRouter({
    mode: "history",
    base: process.env.BASE_URL,
    routes,
});

export default router;